//
//  ShowsViewController.m
//  RadioApp
//
//  Created by Ryan Enguero on 5/8/14.
//  Copyright (c) 2014 engueroryan. All rights reserved.
//

#import "ShowsViewController.h"
#import "ShowsTableViewCell.h"

@interface ShowsViewController ()

@end

@implementation ShowsViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        self.title = NSLocalizedString(@"Shows", @"Shows");
        
        
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    

}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    //#warning Potentially incomplete method implementation.
    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    //#warning Incomplete method implementation.
    // Return the number of rows in the section.
    return 10;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    //    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
    //
    //    // Configure the cell...
    //
    //    return cell;
    
    
    
    
    static NSString *CellIdentifier = @"Cell";
    
    ShowsTableViewCell *cell = (ShowsTableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
    if (cell == nil) {
        
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"ShowsTableViewCell" owner:self options:nil];
        cell = [nib objectAtIndex:0];
    }
    
    // Configure the cell...
    
    cell.showName.text = [NSString stringWithFormat:@"Show %d", indexPath.row];
    
    cell.djName.text = [NSString stringWithFormat:@"DJ %d", indexPath.row];

    cell.scheduledDay.text = [NSString stringWithFormat:@"Scheduled day %d", indexPath.row];

    cell.showTime.text = [NSString stringWithFormat:@"Time %d", indexPath.row];

    //[cell setImageString:@""];
    
    cell.bgImg.image = [UIImage imageNamed:@"showsOnAir.png"];
    
    return cell;
}


@end
